Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use return values instead of assertions #12

Merged
merged 14 commits into from
Dec 11, 2023

Conversation

Sidelobe
Copy link
Collaborator

@Sidelobe Sidelobe commented Dec 10, 2023

Assertions are useful for quick n' dirty stuff, but using the return values gives runtime control when handling errors.
Since the function documentation already uses return values, I assume this is how things were originally intended.

Thanks to http://github.com/pslack for some of the code snippets used here.

@Sidelobe Sidelobe merged commit 7523506 into master Dec 11, 2023
10 checks passed
@Sidelobe Sidelobe deleted the feature/ReturnVal-instead-Assert branch December 11, 2023 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant